package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingPlan;
import com.zzyl.entity.NursingProject;
import com.zzyl.entity.NursingProjectPlan;
import com.zzyl.vo.NursingPlanVo;
import com.zzyl.vo.NursingProjectPlanVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface NursingPlanMapper {
    Page<NursingPlan> selectByPage(
            @Param("planName") String planName,
            @Param("status") Integer status
    );
    List<NursingPlanVo> findAll();

    NursingPlan findById(Integer id);

    void createNursingPlan(NursingPlanVo nursingPlanVo);
    void createNursingProjectPlan(List<NursingProjectPlan> projectPlanVo);

    void deleteById(Long id);

    @Update("update nursing_plan set status= #{status} where id= #{id}")
    void changeStatus(Long id, Integer status);

    void updatePlan(NursingProjectPlanVo nursingProjectPlanVo);

    void updateProjectsPlan(NursingProjectPlan project);

//    void updatePlan(NursingProjectPlanVo vo);
//    void updateProjectsPlan(NursingProjectPlan nursingProjectPlan);
}